/**
 * 
 * @param {*} node 
 */
function listNodeToArr(node) {
    let arr = [];
    let head = node;
    while(head) {
        arr.push(head.val);
        head = head.next;
    }
    return arr;
}
module.exports = listNodeToArr;